1. Field of the Invention
The present invention relates to an image processing apparatus having a filter device, which is for removing noise in an encoded image, and a decoding device that uses the filter device, the filter device, methods of controlling the image processing apparatus and filter device, and computer programs for controlling the image processing apparatus and filter device.
2. Description of the Related Art
There is a known image processing apparatus in which a filter processing device is provided on the output side of a decoding device in order to remove encoding noise produced when an image signal is subjected to compressive encoding. For example, the specification of Japanese Patent Laid-Open No. 09-186993 proposes an image processing apparatus in which generated noise is classified into block noise and mosquito noise and the strength of a filter is adjusted adaptively in accordance with the noise. A further image processing apparatus known in the art adjusts filter strength more accurately by utilizing a particular characteristic, namely that of these two types of noise, mosquito noise is produced in the vicinity of the image edge.
In the image processing apparatus described above, inverse quantization and an inverse orthogonal transformation are carried out after encoded data is decoded. Furthermore, filter processing is executed in order to remove quantization noise that has been produced by the inverse quantization and inverse orthogonal transformation. In filter processing, an edge map is generated utilizing a preset threshold value and mosquito noise produced in the vicinity of the image edge is reduced using the edge map.
However, the conventional technique set forth above has certain problems. For example, an image that has been encoded contains an edge that was present prior to encoding and an edge produced by encoding noise. In other words, in order to improve image quality, it is necessary that these two edges be classified precisely and that only encoding noise be removed.
In the prior art described above, however, a range of threshold values utilized in edge detection is decided empirically and therefore it is difficult to quantitatively measure what the edge map will be. In such cases, for example, there are instances where a false edge produced by encoding is detected erroneously as an edge that existed before encoding was performed. If erroneous detection occurs, low-pass filtering will be applied to the vicinity of this edge. Consequently, a problem which arises is that the resolution of the image after noise reduction is diminished more than is necessary.